package leecode

func countDigits(num int) int {
	if num < 10 {
		return 1
	}
	var result int
	static := num
	for num > 0 {
		temp := num % 10
		if temp == 0 {
			continue
		}
		if static%temp == 0 {
			result++
		}
		num = num / 10
	}
	return result
}
